home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #Tag 0x00010D80
-
- #setup
- DFCMD="df -k"
- DUCMD="du -sk"
-
- # make sure we have the path for xconfirm
- PATH=$PATH:/usr/bin/X11
- xconfirmPath=`which xconfirm`
- if [ $? = 0 ] ; then
- hasUI=1
- else
- hasUI=0
- fi
-
- # test which awk program to use
- osVer=`uname -r`
- case $osVer
- in
- 5*) AWK="nawk" ;;
- *) AWK="awk" ;;
- esac
-
- # get cpu board name
- # Note: currently, the accelerated filters are installed only
- # if the CPU board is IP32
- ip=`uname -m`
-
- # setting up the user splashScreenFile preference
- splashScreenFile=$HOME/.photoshop_sgi
-
- # save current invoking directory
- workdir=$PWD
-
- # check for Multiple Instances
- checkMultipleInstances()
- {
-
- lockFile="$pluginFullpath"/.sgips."$USER".lock
-
- if [ -f "$lockFile" ] ; then
- multinst=1
- else
- multinst=0
- touch "$lockFile"
- fi
-
- if [ "$multinst" -eq 1 ] ; then
- if [ "$hasUI" = 1 ] ; then
- result=`/usr/bin/X11/xconfirm -icon error \
- -t "Another instance of photoshop_sgi is already running. " \
- -t "Running multiple instances of photoshop_sgi may hang or produce bad effects." \
- -t "Exit?" -B Quit ${1+"$@"}`
- else
- echo "Another instance of photoshop_sgi is already running. "
- echo "Running multiple instances of photoshop_sgi may hang or produce bad effects."
- fi
- exit 1
- fi
- }
-
-
- # function to check user preference to display the splash screen
- displaySplashScreen()
- {
- #jump out to support time out splash
- return 1
-
- if [ -f $splashScreenFile -a -r $splashScreenFile ] ; then
- cat $splashScreenFile | grep "no" > /dev/null
- if [ $? = 0 ] ; then
- return 0
- fi
- fi
- return 1
- }
-
- # function to locate the real Adobe Photoshop name
- getAdobePhotoshopName()
- {
- # We need to find the absolute path for Adobe Photoshop launch script
- # in order to determine what version of photoshop install in the system.
- # In case the user happens run this script inside the actual path of
- # the photoshop directory, we temporary goto the /tmp directory
- tmpDir=
- cd /tmp
- retryGetAdobePhotoshopName=0
-
- # in case the user happens to have an photoshop executable there
- # it will mess everything up.
- if [ -f "photoshop" ] ; then
- tmpDir=.photoshop_sgi.$USER
- mkdir $tmpDir 2> /dev/null
- cd $tmpDir 2> /dev/null
- fi
- AdobePhotoshop=`which photoshop`
-
- if [ $? != 0 ] ; then
- if [ $hasUI = 1 ] ; then
- ret=`xconfirm -c \
- -t "" \
- -t "Adobe Photoshop must be installed to run photoshop_sgi." \
- -t "" \
- -b "OK" \
- -icon error \
- -header "Photoshop Performance Pack" ${1+"$@"} `
- else
- echo "Adobe Photoshop must be installed to run photoshop_sgi."
- fi
- exit 1
- fi
-
- # Determine Adobe Photoshop launch script directory and set it to
- # adobeScriptDir
- if [ -l $AdobePhotoshop ] ; then
- adobeScriptDir=`ls -l $AdobePhotoshop | $AWK '/bin/ { print $11 }'`
- else
- adobeScriptDir="$AdobePhotoshop"
- fi
-
- # Test if the adobeScriptDir contains a legitimate abs path
- index=
- index=`echo "$adobeScriptDir" | awk '/Photoshop_/ { print $0 }'`
- if [ -z "$index" ] ; then
- adobeScriptDir=
- while [ -z "$adobeScriptDir" ] ; do
- echo " "
- echo " "
- echo "Can't determine Adobe Photoshop directory."
- echo "Please enter the absolute path of the Photoshop launch script."
- echo "It should be something like: "
- echo "/usr/adobe/Photoshop_X.X/bin/photoshop"
- echo " "
- read adobeScriptDir
-
- index=
- index=`echo "$adobeScriptDir" | awk '/Photoshop_/ { print $0 }'`
- if [ -z "$index" ] ; then
- adobeScriptDir=
- fi
- done
- fi
-
- adobeScriptDir=`expr $adobeScriptDir : '\(.*\)/'`
-
- # locate the Adobe Photoshop Root Directory and set it to "adobeRoot"
- adobeRoot=`echo $adobeScriptDir | $AWK 'gsub("/bin", "") { print $0 }'`
-
- num=`expr $adobeScriptDir : ".*/bin"`
- if [ "$num" -gt 0 ] ; then
- adobeVer=`expr $adobeScriptDir : '.*/\(.*\)/bin'`
- else
- adobeVer=`expr $adobeScriptDir : '.*/\(.*\)'`
- fi
-
- ver=$adobeVer
- ver=`echo $ver | $AWK ' gsub("Photoshop_", "") { print $0; }'`
- verFullString=$ver
-
- versionMajor=`echo $ver | $AWK ' {i=index($1, "."); if (i > 1) print substr($1, 1, i-1); else print $1} '`
-
- if [ -z "$versionMajor" ] ; then
- echo "Can't determine what version of photoshop you are running"
- echo "Please check your software installation."
- exit 1
- fi
- scriptAdobe=$adobeScriptDir/photoshop_adobe
-
- # set the Adobe Photoshop launch script in the "AdobePhotoshop"
- if [ -f "$scriptAdobe" ] ; then
- AdobePhotoshop="$scriptAdobe"
- else
- AdobePhotoshop="$adobeScriptDir/photoshop"
- fi
-
- # setup all other pshop variables here
- pshopBin="/usr/lib/pshop/bin"
- adobeRealBinary="$adobeRoot/lib/AdobePhotoshop$verFullString"
- subsExec="$pshopBin/subs"
- # sgiBinary="$pshopBin"/AdobePhotoshop"$verFullString"_sgi
- sgiBinary="$pshopBin"/AdobePhotoshop_sgi
- adobeBinary="$adobeRoot"/lib/AdobePhotoshop"$verFullString"
-
- # restore back to original directory
- test -n "$tmpDir"
- if [ $? = 0 ] ; then
- cd /tmp
- rm -r $tmpDir 2> /dev/null
- fi
- cd $workdir
- return 0
- }
-
- isRoot()
- {
- STDBINDIR="/usr/bin"
- WHOAMI=`$STDBINDIR/id | $STDBINDIR/sed 's/^[^(]*.\([^)]*\).*/\1/'`
-
- # Abort installation if user not superuser
- if [ "$WHOAMI" != root ] ; then
- if [ $hasUI = 1 ] ; then
- ret=`xconfirm -c \
- -t "" \
- -t "You must be logged in as root to run this command" \
- -t 'Type "su root" and enter the password to become root.' \
- -t "" \
- -b "OK" \
- -icon error \
- -header "Photoshop Performance Pack" ${1+"$@"}`
- else
- echo ""
- echo "You must be logged in as root to run this command"
- echo 'Type "su root" and enter the password to become root.'
- fi
- exit 1
- fi
- return 0
- }
-
- runExitCommand()
- {
- if [ $hasUI = 1 ] ; then
- ret=`xconfirm -c \
- -t "" \
- -t "To view the updated Icon Catalog, please log out and then back in." \
- -t "When you login select Applications from the Find Toolchest menu button." \
- -t "" \
- -icon info \
- -b "OK" \
- -header "Photoshop Performance Pack" ${1+"$@"}`
- else
- echo "New application icons will not appear in your Icon Catalog until you log"
- echo "out and log back in again (choose "Applications" on the Find toolchest.)"
- echo ""
- fi
-
- return
- }
-
- # function to check if the system has been updated
- checkSystemHasBeenUpdated()
- {
- # test if user has done the update or not
- if [ $versionMajor -le 3 ] ; then
- test -f $sgiBinary
- ret1=$?
- test -s $sgiBinary
- ret2=$?
- if [ $ret1 != 0 -o $ret2 != 0 ] ; then
- if [ $hasUI = 1 ] ; then
- ret=`xconfirm -c \
- -t "" \
- -t "To enable this program, you" \
- -t "must log in as root and" \
- -t 'execute "photoshop_sgi -update"' \
- -t "" \
- -icon error \
- -b "OK" \
- -header "Photoshop Performance Pack" ${1+"$@"}`
- else
- echo "To enable this program, you"
- echo "must log in as root and"
- echo 'execute "photoshop_sgi -update"'
- fi
- exit 2
- fi
- fi
- }
-
- # function to check for system command
- checkSystemCommand()
- {
- if [ $# -gt 2 -o $# -eq 0 ] ; then
- return
- fi
-
- if [ $# = 1 ] ; then
- if [ "$1" = "-update" ] ; then
- isRoot
- fixPhotoshop
- exit 0
- elif [ "$1" = "-default" -o "$1" = "-adobe" ] ; then
- checkSystemHasBeenUpdated
- if [ $? = 0 ] ; then
- isRoot
- if [ $? = 0 ] ; then
- if [ "$1" = "-default" ] ; then
- # rename real Adobe photoshop launch script as photoshop_adobe
- # install photoshop_sgi as photoshop
- # rm photoshop_sgi from iconcatalog
- if [ ! -f $adobeScriptDir/photoshop_adobe ] ; then
- mv "$adobeScriptDir/photoshop" "$adobeScriptDir/photoshop_adobe"
- ln -s "/usr/bin/photoshop_sgi" "$adobeScriptDir/photoshop"
- /usr/sbin/iconbookedit -remove "Category:File Name:/usr/bin/photoshop_sgi" -syspage Applications
- runExitCommand
- exit 0
- fi
- else
- # remove symbolic link of photoshop_sgi inside Adobe Photoshop directory
- # restore photoshop_adobe back to photoshop
- # add photoshop_sgi to iconcatalog
- if [ -f $adobeScriptDir/photoshop_adobe ] ; then
- rm "$adobeScriptDir/photoshop"
- mv "$adobeScriptDir/photoshop_adobe" "$adobeScriptDir/photoshop"
- /usr/sbin/iconbookedit -add "Category:File Name:/usr/bin/photoshop_sgi" -syspage Applications
- runExitCommand
- exit 0
- fi
- fi
-
- fi
- exit 0
- fi
- else
- # not a system command
- return
- fi
- fi
- }
-
- getFreeSpace()
- {
- freeSpace=`$DFCMD | $AWK '/\/usr\/lib/ { print $5 }'`
- test -z "$freeSpace"
- if [ $? = 1 ] ; then
- PSFileSystem="/usr/lib"
- return 0
- fi
-
- freeSpace=`$DFCMD | $AWK '/\/usr$/ { print $5 }'`
- test -z "$freeSpace"
- if [ $? = 1 ] ; then
- PSFileSystem="/usr"
- return 0
- fi
-
- freeSpace=`$DFCMD | $AWK '/\/$/ { print $5 }'`
- test -z "$freeSpace"
- if [ $? = 1 ] ; then
- PSFileSystem="/"
- return 0
- else
- echo "Can't locate file system for this application."
- PSFileSystem=""
- return 1
- fi
- }
-
- # function to determine whether system has enough disk space
- # to do any update
- checkFreeSpace()
- {
- # determine required disk space for the update
- if [ -f "$adobeBinary" ] ; then
- needSpace=`$DUCMD "$adobeBinary" | awk '{ print $1 }'`
- else
- echo "Cannot determine the Adobe Photoshop Binary."
- echo "Check your photoshop installation."
- exit 1
- fi
-
- # determine free space on the file system where "sgips" installed.
- getFreeSpace
-
- if [ $? = 0 ] ; then
- if [ $freeSpace -lt $needSpace ] ; then
- if [ $hasUI = 1 ] ; then
- ret=`xconfirm -c \
- -t "" \
- -t "You do not have enough free space ($freeSpace Kb) " \
- -t "on this filesystem \""$PSFileSystem"\" " \
- -t "to do any update." \
- -t "" \
- -b "OK" \
- -icon error \
- -header "Photoshop Performance Pack" ${1+"$@"}`
- else
- echo ""
- echo "You do not have enough free space ("$needSpace" Kb)"
- echo "on this filesystem \""$fileSystem"\" "
- echo "to do any update."
- fi
- exit 1
- else
- return 0
- fi
- else
- echo "Cannot determine the file system where"
- echo "Photoshop Performance Package installed."
- echo "Check your installation."
- exit 1
- fi
- }
-
-
- fixPhotoshop()
- {
- # make sure there is not any symbolic link in
- # plug-in directory
- curDir="$PWD"
- cd "/usr/lib/pshop/plug-ins"
- if [ $? = 0 ] ; then
- for i in *
- do
- if [ -l "$i" ] ; then
- rm "$i" 2> /dev/null
- fi
- done
- fi
- cd "$curDir"
-
- # respin binary if necessary
- if [ $versionMajor -le 3 ] ; then
- test -f $sgiBinary
- ret1=$?
- test -s $sgiBinary
- ret2=$?
- if [ $ret1 != 0 -o $ret2 != 0 ] ; then
- # if [ ! -f "$sgiBinary" ] ; then
- checkFreeSpace
- $subsExec "aio_sgi_init" "Aio_sgi_init" \
- "aio_write" "Aio_write" \
- "aio_read" "Aio_read" \
- "aio_suspend" "Aio_suspend" \
- "aio_hold" "Aio_hold" \
- "aio_init" "Aio_init" \
- "aio_handle_notify" "Aio_handle_notify" \
- "aiofreelink" "Aiofreelink" \
- "aiochkcnt" "Aiochkcnt" \
- "aio_grab_alock" "Aio_grab_alock" \
- "aio_release_alock" "Aio_release_alock" \
- "aio_wait" "Aio_wait" \
- "aio_new" "Aio_new" \
- "aio_get" "Aio_get" \
- "aio_free" "Aio_free" \
- "aio_call_callback" "Aio_call_callback" \
- "aioinfo" "Aioinfo" \
- "aio_reqprio" "Aio_reqprio" \
- "_aqueue" "_Aqueue" < $adobeBinary > $sgiBinary
- chmod 755 $sgiBinary
- fi
- fi
-
- echo ""
- checkIrix64DesktopInstall
- check6XLaunchScriptToDisableAsyncIO
- check6XScreenCapture
- checkKPT
- fixKPThelp
-
- if [ $correctDesktop = 1 ] ; then
- fixIrix64DesktopInstall
- fi
-
- if [ $correct6XLaunchScript = 1 ] ; then
- fix6XLaunchScriptToDisableAsyncIO
- fi
-
- if [ $correctScreenCapture = 1 ] ; then
- fix6XScreenCapture
- fi
-
- if [ $correctKPT = 1 ] ; then
- fixKPT
- fi
-
- if [ $correctDesktop = 0 -a \
- $correct6XLaunchScript = 0 -a \
- $correctKPT = 0 -a \
- $correctScreenCapture = 0 ] ; then
- echo "Photoshop contains necessary fixes. Nothing additional to do."
- fi
-
- echo ""
- }
-
- checkIrix64DesktopInstall()
- {
- irix64="IRIX64"
- osname=`uname -s`
-
- if [ "$osname" = "$irix64" ] ; then
- filetypeDir="/usr/lib/filetype/install"
- if [ -f $filetypeDir/photoshop.ftr -a \
- -f $filetypeDir/iconlib/photoshop.doc.fti -a \
- -f $filetypeDir/iconlib/photoshop.exec.fti ] ; then
- correctDesktop=0
- else
- correctDesktop=1
- fi
- else
- correctDesktop=0
- fi
- }
-
- checkKPT()
- {
- # assume we don't need to do anything with KPT
- correctKPT=0
-
- if [ -d "/usr/lib/kpt" ] ; then
- rm -f "/tmp/photoshop_kpt"
-
- cat $AdobePhotoshop | $AWK ' \
- /echo Launching Adobe Photoshop/ { print $0 >> "/tmp/photoshop_kpt"; \
- print "_RLD_ARGS=-ignore_unresolved" >> "/tmp/photoshop_kpt"; \
- print "export _RLD_ARGS # KPT workaround" >> "/tmp/photoshop_kpt"; next; }
- /_RLD_ARGS/ { next; }
- { print >> "/tmp/photoshop_kpt" }'
-
- diff $AdobePhotoshop "/tmp/photoshop_kpt" >/dev/null 2>>/dev/null
-
- if [ $? = 0 ] ; then
- correctKPT=0
- else
- correctKPT=1
- fi
- rm -f "/tmp/photoshop_kpt"
- fi
- }
-
- fixIrix64DesktopInstall()
- {
- echo "Updating Desktop icon"
- desktopDir=$adobeRoot/desktop
- deskScript=$desktopDir/deskinstall
- if [ -f $deskScript ] ; then
- mv "$deskScript" "$deskScript".adobe
- cat $deskScript.adobe | $AWK ' \
- /uname -s/ { print $0 >> "/tmp/deskinstall_tmp"; \
- print "case \"$osname\" in" >> "/tmp/deskinstall_tmp"; \
- print "IRIX*) osname=IRIX ;; " >> "/tmp/deskinstall_tmp"; \
- print "esac" >> "/tmp/deskinstall_tmp"; next }
- { print $0 >> "/tmp/deskinstall_tmp" }'
-
- # execute the new deskinstall script
- cp "/tmp/deskinstall_tmp" $deskScript
- rm "/tmp/deskinstall_tmp"
- chmod 755 $deskScript
- $deskScript
- else
- echo "Can't locate AdobePhotoshopRoot/desktop directory"
- echo "Check your Adobe Photoshop Installation"
- fi
- }
-
- check6XLaunchScriptToDisableAsyncIO()
- {
- # IP=`hinv | awk '/IP[0-9][0-9]*/ { print $4 }'`
- # IP=`hinv | sed -n -e '/[ ]IP/p' | sed -e 's/^.*\(IP..\).*/\1/'`
- #
- # if [ "$IP" = "IP32" ]; then
- # correct6XLaunchScript=0
- # return
- # fi
-
- correct6XLaunchScript=0
- osver=`uname -r`
- case $osver in
- 5.*) return ;;
- esac
-
- rm -f "/tmp/photoshop_tmp"
- # It is at least 6.X version
- cat $AdobePhotoshop | $AWK ' \
- /export PATH/ { print $0 >> "/tmp/photoshop_tmp"; \
- print "PHOTOSHOP_DEBUG_NO_AIO=1 # get around bug in async I/O with new libc" >> "/tmp/photoshop_tmp"; \
- print "export PHOTOSHOP_DEBUG_NO_AIO" >> "/tmp/photoshop_tmp"; next; }
- /PHOTOSHOP_DEBUG_NO_AIO/ { next; }
- { print >> "/tmp/photoshop_tmp" }'
-
- diff $AdobePhotoshop "/tmp/photoshop_tmp" >/dev/null 2>>/dev/null
- if [ $? = 0 ] ; then
- correct6XLaunchScript=0
- rm "/tmp/photoshop_tmp"
- else
- correct6XLaunchScript=1
- fi
-
- }
-
- fix6XLaunchScriptToDisableAsyncIO()
- {
- echo "Updating AsyncIO"
- mv $AdobePhotoshop $adobeScriptDir/photoshop.adobe.orig
- chmod 755 "/tmp/photoshop_tmp"
- cp "/tmp/photoshop_tmp" $AdobePhotoshop
- rm "/tmp/photoshop_tmp"
- }
-
- check6XScreenCapture()
- {
- srcPlugins="/usr/lib/pshop/plug-ins"
- dstPlugins="$adobeRoot/Adobe$adobeVer/Plug-ins/Acquire_Export"
- retScreenCapture1=0
-
- if [ -f $srcPlugins/ScreenCapture ] ; then
- diff $srcPlugins/ScreenCapture $dstPlugins/Screen\ Capture >/dev/null 2>>/dev/null
- retScreenCapture1="$?"
- fi
-
- if [ $retScreenCapture1 = 1 ] ; then
- correctScreenCapture=1
- else
- correctScreenCapture=0
- fi
-
- }
-
- fixKPT()
- {
- echo "Updating KPT filters"
-
- if [ -d "/usr/lib/kpt" ] ; then
- rm -f "/tmp/photoshop_kpt"
-
- cat $AdobePhotoshop | $AWK ' \
- /echo Launching Adobe Photoshop/ { print $0 >> "/tmp/photoshop_kpt"; \
- print "_RLD_ARGS=-ignore_unresolved" >> "/tmp/photoshop_kpt"; \
- print "export _RLD_ARGS # KPT workaround" >> "/tmp/photoshop_kpt"; next; }
- /_RLD_ARGS/ { next; }
- { print >> "/tmp/photoshop_kpt" }'
-
- diff $AdobePhotoshop "/tmp/photoshop_kpt" >/dev/null 2>>/dev/null
-
- if [ $? = 0 ] ; then
- correctKPT=0
- else
- chmod 755 "/tmp/photoshop_kpt"
- cp "/tmp/photoshop_kpt" $AdobePhotoshop
- fi
- rm -f "/tmp/photoshop_kpt"
- fi
- }
-
- fixKPThelp()
- {
- KptHelp="/usr/share/Insight/library/SGI_bookshelves/ISV_Help/books/KPT/styles"
- # save current directory
- dir="$PWD"
- if [ -d "$KptHelp" ] ; then
- cd "$KptHelp"
- if [ -f "fulltext.v" ] ; then
- if [ ! -f "fulltext.hlp" ] ; then
- if [ ! -l "fulltext.hlp" ] ; then
- ln -s "fulltext.v" "fulltext.hlp" >/dev/null 2>>/dev/null
- fi
- fi
- fi
- # restore back to original directory
- cd "$dir"
- fi
- }
-
- fix6XScreenCapture()
- {
- echo "Updating Screen Capture Plugin"
- if [ -f $srcPlugins/ScreenCapture ] ; then
- cp $srcPlugins/ScreenCapture $dstPlugins/Screen\ Capture
- fi
- }
-
- # find out the real Adobe Photoshop Name
- getAdobePhotoshopName
-
- # compose user plug-in full path
- if [ "$PHOTOSHOP_ROOT" = "" ] ; then
- pluginFullpath=$HOME/AdobePhotoshop$versionMajor/Plug-ins
- else
- pluginFullpath="$PHOTOSHOP_ROOT"/Plug-ins
- fi
-
- # check if this is the system maintenance command
- checkSystemCommand ${1+"$@"}
-
- # check if system has been updated
- # If not, prompt to the user and exit
- checkSystemHasBeenUpdated
-
- # test if user has this plug-in directory
- test -d $pluginFullpath
- if [ $? != 0 ] ; then
- if [ $hasUI = 1 ] ; then
- ret=`xconfirm -c \
- -t "" \
- -t "You need to run photoshop at least one time before you can" \
- -t "take advantage of this program." \
- -t "" \
- -icon error \
- -b "OK" \
- -header "Photoshop Performance Pack" ${1+"$@"}`
- else
- echo "You need to run photoshop at least one time before you can"
- echo "take advantage of this program."
- fi
- exit 2
- fi
-
- # check for multiple instances
- checkMultipleInstances
-
- # go back to the original directory
- cd $workdir
-
- displaySplashScreen
- showSplashScreen=$?
- if [ $showSplashScreen != 0 ] ; then
- if [ $hasUI = 1 ] ; then
- xconfirm -c \
- -t "SGI Accelerated version of Adobe Photoshop $ver" \
- -t "" \
- -t "Adobe Photoshop (C) Copyright 1989-1996" \
- -t "Adobe Systems Incorporated. All rights reserved." \
- -t "" \
- -t "For additional information on this launch script, " \
- -t "please man photoshop_sgi." \
- -b "" \
- -header "Photoshop Performance Pack" \
- -noframe ${1+"$@"} &
- xconfirm_pid=$!
- sleep 5
- kill -9 $xconfirm_pid >/dev/null 2>>/dev/null
- else
- # No xconfirm utility, just display it inside this shell (should not happens)
- echo "SGI Accelerated version of Adobe Photoshop $ver"
- echo ""
- echo "Adobe Photoshop (C) Copyright 1989-1996"
- echo "Adobe Systems Incorporated. All rights reserved."
- fi
- fi
-
- # setting up sgi photoshop plug-ins only if it is IP32
- sgiPlugins=/usr/lib/pshop/plug-ins
- userPlugins="$pluginFullpath"/SGI
- if [ $ip = "IP32" ] ; then
- # make sure they are not pointing to the same directory
- if [ "$sgiPlugins" = "$pluginFullpath" ] ; then
- setlink=0
- else
- if [ ! -l $userPlugins ] ; then
- setlink=1
- ln -s $sgiPlugins $userPlugins
- fi
- fi
- fi
-
- # For any Photoshop version 3 or before, do the followings:
- if [ "$versionMajor" -le 3 ] ; then
- PHOTOSHOP_BINARY="$sgiBinary"
- export PHOTOSHOP_BINARY
-
- # link with the original Adobe Launch Script
- if [ -f "$adobeRoot"/bin/photoshop.adobe.orig ] ; then
- AdobePhotoshop="$adobeRoot"/bin/photoshop.adobe.orig
- fi
- fi
-
- # set TILE SIZE if it is not already set
- if [ "$PHOTOSHOP_DEBUG_TILESIZE" = "" ] ; then
- PHOTOSHOP_DEBUG_TILESIZE=128
- export PHOTOSHOP_DEBUG_TILESIZE
- fi
-
- # trap all signals
- trap "" 0 1 2 3 4 5 8 10 12 15
-
- # KPT workaround
- _RLD_ARGS=-ignore_unresolved
- export _RLD_ARGS
-
- # execute the photoshop
- $AdobePhotoshop ${1+"$@"}
-
- wait
-
- # removing symbolic links
- if [ $ip = "IP32" ] ; then
- if [ $setlink = 1 ] ; then
- if [ -l $userPlugins ] ; then
- rm $userPlugins
- fi
- fi
- fi
-
- # remove lockFile
- if [ -f "$lockFile" ] ; then
- rm "$lockFile"
- fi
-
- # exit
-